{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "from torch.nn.functional import gumbel_softmax\n",
    "import numpy as np\n",
    "from torch import *\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.00613775, 0.04084676, 0.08845273, 0.25141433, 0.61314845],\n",
       "      dtype=float32)"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gumbel_softmax(d, tau=1).numpy().flatten()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 229,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.14726308, 0.00988898, 0.8077844 , 0.02559457, 0.00946903],\n",
       "      dtype=float32)"
      ]
     },
     "execution_count": 229,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl8lPW59/HPlclGSEiAhCULJCDIJmsAC9S60FOwCrXI1nqqXY7tOfXp+nTvsT329FRtn/bY1h5rrac97aksbkVEaQGtYEUIIDtIZA0QEgKE7JPJXM8fMwkxJmSSzOSe5Xq/XryczPyY+XqTuea+f/NbRFUxxhgTXeKcDmCMMSb4rLgbY0wUsuJujDFRyIq7McZEISvuxhgThay4G2NMFLLibowxUciKuzHGRCEr7sYYE4XinXrhzMxMzc/Pd+rljTEmIu3YseO8qmZ11s6x4p6fn09RU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1y9TlXPqupO/+0q4CDv3YSm149XgLl6nf8YVPt/TPD/afuFXa+/HwPM5QgRyQU+DDzRQZOQHq9wLu5B2wHKgVwAi/yX8k+LSF47jzsh0OxOeJ//0volERnfmy/svxyegu+srzVHj9dVcoEDx8vfxfAWUAb8VVU7PF69+H4MJBc48378T+DrgLeDx0N6vMK5uAdtB6ggC+Q1XwDyVXUisIErn85Oc+J4BWInvinVk4BfAM/31guLSCrwDPAlVb3c9uF2/kqvHK9OcjlyvFS1SVUn49uwZ4aITGjTxJHjFUCuXn8/ishtQJmq7rhas3buC9rxCufiHq47QHWaS1UrVLXB/+NvgGkhzhSoQI5pr1PVy82X1upbXjpBRDJD/boikoCvgP6vqj7bThNHjldnuZw6Xq1e/xLwKjCvzUOO7sjWUS6H3o+zgQUichxf1+3NIvLHNm1CerzCubiH6w5QneZq0y+7AF+/aThYA3zCPwrkeqBSVc86HUpEhjT3NYrIDHy/lxUhfk3Bt8nMQVX9aQfNev14BZLLoeOVJSIZ/tt9gLnAoTbNev39GEguJ96PqvotVc1V1Xx8NWKTqt7VpllIj1dAm3U4QcN0B6gAc31BRBYAHn+ue0KdC0BEnsI3kiJTREqA7+H7gglVfQzfhiu3AsVALfDJMMl1J/DPIuIB6oBlvfAhPRv4R2Cvv78W4NvAsFa5nDhegeRy4ngNBX4vIi58HyarVHWt0+/HAHM58n5sT28eL5uhaowxUSicu2WMMcZ0kxV3Y4yJQlbcjTEmCllxN8aYKGTF3RhjopAVd2OMiUJW3I0xJgpZcTfGmCj0/wEIP5wn7Kj3hgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "d = Tensor([[1, 2, 5, 2, 2]])\n",
    "gumbel = gumbel_softmax(d, tau=1).numpy().flatten()\n",
    "plt.plot([x for x in range(len(d[0]))], gumbel, '--', linewidth=2, markersize=12)\n",
    "gumbel"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x28284722860>]"
      ]
     },
     "execution_count": 132,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl8VPW9xvHPN5OEhCUBJKwBQQWVzYWIdbdqLdYK7sVu0ltLb69a77WtVW/rVqvdbm1tbdVaa+2tUi/VihVFudarRUUCIhA2Y1wIEEAkYcs+3/tHBhzihAwwkzPL8369eJnJ/DLnyTHz5OQ3vznH3B0REcksOUEHEBGRxFO5i4hkIJW7iEgGUrmLiGQglbuISAZSuYuIZCCVu4hIBlK5i4hkIJW7iEgGyg1qw/369fPhw4cHtXkRkbS0cOHCD9y9pLNxgZX78OHDKS8vD2rzIiJpyczei2ecpmVERDKQyl1EJAOp3EVEMpDKXUQkA6ncRUQyUFzlbmaTzGyVmVWa2fUx7r/LzBZH/q02s9rERxURkXh1uhTSzELAPcCngGpggZnNcvflu8a4+39Ejb8aOCYJWUVEJE7xHLlPBCrdvcrdm4AZwJS9jL8MeDQR4UREMkntziaaWsJdsq14yn0IsCbqdnXkcx9jZgcDI4AXOrh/upmVm1n5pk2b9jWriEhau27mEs69+2VWrN+a9G3FU+4W43MdXVV7KjDT3Vtj3enu97t7mbuXlZR0+u5ZEZGMMaeihueWb2B9XQN9uucnfXvxlHs1MDTqdimwroOxU9GUjIjIHrY3tnDLrAoAvn32KAYWFyR9m/GU+wJgpJmNMLN82gp8VvtBZnY40Ad4NbERRUTS213Pr2Z9XQPjS4v50gnDu2SbnZa7u7cAVwFzgBXA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JAP9P9HozYET+eiNAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot([x for x in range(len(d[0]))], gumbel_softmax(d, tau=.5).numpy().flatten(), '--', linewidth=2, markersize=12)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 155,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x28285f1bcf8>]"
      ]
     },
     "execution_count": 155,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl0nPV97/H3dySNdq+SbFmyLLwbb9gWZt9sKA4BmwRsww1J6aFxN9rmJtyWNPfSNPekWe5t0ibhhpKlaZom2IYChhgIARN2IxnvG5bNYkk2kjfZlmStv/vHjIwiJGtkzcwz88zndY7PkTQ/aT56YL7z6Pf8nu/PnHOIiIi/BLwOICIi0afiLiLiQyruIiI+pOIuIuJDKu4iIj6k4i4i4kMq7iIiPqTiLiLiQyruIiI+lO7VExcUFLjy8nKvnl5EJClt2rTpiHOucKBxnhX38vJyqqqqvHp6EZGkZGbvRzJO0zIiIj6k4i4i4kMq7iIiPqTiLiLiQyruIiI+NGBxN7Ofmlm9me3o53Ezs++ZWbWZbTOz+dGPKSIigxHJmfvPgCXnePwTwJTwv1XAD4ceS0REhmLA4u6cexk4do4hy4Cfu5A3gRFmVhytgCIiMnjRmHMvAQ72+Lwm/LWPMbNVZlZlZlUNDQ1ReGoZyLtHmvjyf23jO7/Z63UUEYmjaBR36+Nr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LOvR3++BSwm9BewD3F/XhFmCvuwsfgdPjTjPC/3hfs4v56jDCXJ8ysFPgk8ON+hsT0eCVyce9rY+7e/5P/3sbcQPfG3F7nArgt/Kf8o2Y2PsaZIhVpdi9cFv7T+hkzmxnPJw7/OTyP0FlfT54er3PkAg+OV3iKYQtQDzzvnOv3eMXx9RhJLvDm9fjPwN8A/W34HNPjlcjFPWobc0dZJM/5FFDunJsD/JaP3p295sXxisTbhG6pngt8H3giXk9sZnnAY8AXnHMnez/cx7fE5XgNkMuT4+Wc63TOXQSUAgvNbFavIZ4crwhyxf31aGY3A/XOuU3nGtbH16J2vBK5uNcAPd9hS4G6/sZYaGPu4cT+z/8BcznnjjrnWsOf/ghYEONMkYrkmMadc+5k95/WLrTrV4aZFcT6ec0sg1AB/U/n3H/1McST4zVQLq+OV4/nPwG8BCzp9ZAXr8cBc3n0erwCWGpm7xGaul1kZr/oNSamxyuRi3uibsw9YK5e87JLCc2bJoJ1wOfCq0AuBRqdc4e8DmVmY7vnGs1sIaH/L4/G+DmN0N6/u51z3+lnWNyPVyS5PDpehWY2IvxxNnA9sKfXsLi/HiPJ5cXr0Tn3ZedcqXOunFCNeNE5d1evYTE9XhHtoeoFl6Abc0eY66/MbCnQEc51d6xzAZjZrwitpCgwsxrg7wldYMI59xChfXBvAqqBZuCPEiTX7cCfmVkH0ALcEYc36SuAzwLbw/O1AH8HlPXI5cXxiiSXF8erGPh3M0sj9Gayxjn3tNevxwhzefJ67Es8j5fuUBUR8aFEnpYREZHzpOIuIuJDKu4iIj6k4i4i4kMq7iIiPqTiLiLiQyruIiI+pOIuIuJD/x8NwgXil3csqgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot([x for x in range(len(d[0]))], gumbel_softmax(d, tau=.1).numpy().flatten(), '--', linewidth=2, markersize=12)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([2.1991761e-11, 5.4951834e-06, 7.7410404e-11, 9.3204198e-06,\n",
       "       9.9998522e-01], dtype=float32)"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gumbel_softmax(d, tau=.2).numpy().flatten()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "tensor([[ 0.8115, -0.6610,  0.4416, -0.3391,  0.5237]])"
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import torch\n",
    "gumbels = -torch.empty_like(d).exponential_().log()  # ~Gumbel(0,1)\n",
    "gumbels"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "tensor([[-7.0065e-45, -0.0000e+00, -7.0065e-45, -0.0000e+00, -1.4013e-45]])"
      ]
     },
     "execution_count": 97,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "-torch.empty_like(d)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "tensor([[-1.2904e-03, -2.5155e+00, -7.5653e-01, -1.5940e-01, -3.7954e-01]])"
      ]
     },
     "execution_count": 98,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "-torch.empty_like(d).exponential_()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "tensor([[3.2490, 1.4132, 0.4668, 0.7051, 1.3644]])"
      ]
     },
     "execution_count": 99,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "-torch.empty_like(d).exponential_().log()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 162,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "tensor([[3.2773e-04, 2.4216e-03, 1.7893e-02, 2.4216e-03, 9.7694e-01]])"
      ]
     },
     "execution_count": 162,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def gumbel(logits, tau=1, hard=False, eps=1e-10, dim=-1):\n",
    "    gumbels = -torch.empty_like(logits).exponential_().log()  # ~Gumbel(0,1)\n",
    "    gumbels = (logits) / tau  # ~Gumbel(logits,tau)\n",
    "    y_soft = gumbels.softmax(dim)\n",
    "    return y_soft\n",
    "gumbel(d, tau=0.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 211,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x2828bf38f28>]"
      ]
     },
     "execution_count": 211,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl8VOd97/HPT0JCaAEEEovRAtgEL2CzyDhOnMSu7QY7CWRxEiBN4nvdOG3tOrdp2jpN6qTObdKmt2nTmLaXJH41SWtjvCQmDil2baeOmxgjAcastkwMEoslQBKL0P7rHzOSh7GEDjAzZ2b0fb9eelln5mHOj4PnO2ee8zzPMXdHRESyS07YBYiISOIp3EVEspDCXUQkCyncRUSykMJdRCQLKdxFRLKQwl1EJAsp3EVEspDCXUQkC40Ka8dlZWU+ffr0sHYvIpKR6urqDrt7+XDtQgv36dOnU1tbG9buRUQykpntDdJO3TIiIllI4S4ikoUU7iIiWUjhLiKShQKFu5ktNrPdZlZvZncP8nyVmT1rZpvNbKuZ3Zz4UkVEJKhhw93McoGV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kSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot([x for x in range(len(d[0]))], gumbel(d, tau=1).numpy().flatten(), '--', linewidth=2, markersize=12)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 218,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "tensor([0.1069, 0.0967, 0.6709, 0.0971, 0.0284])"
      ]
     },
     "execution_count": 218,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "u = Tensor([0, 0, 1, 0, 0])\n",
    "u = u + torch.torch.FloatTensor(u.shape).uniform_(0, 0.2)\n",
    "u = u / u.sum()\n",
    "u"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 219,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x2828d0a6ef0>]"
      ]
     },
     "execution_count": 219,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xd81fd1//HX0dVEQgwhBGgCZjtgg8ys8Y5xYkMS2yleMW4SN2nctEnT/py0TX51m18z2oymTlPq2njEJl5x8IodTxyWEZg9hRBoAFpo73vP7497JYQsoStxdb93nOfjoQe6935075uvdM/93s/9DFFVjDHGRJYYpwMYY4wJPCvuxhgTgay4G2NMBLLibowxEciKuzHGRCAr7sYYE4GsuBtjTATyq7iLyAoROSwihSLyYB+3/1REdvm+johIbeCjGmOM8ZcMNIlJRFzAEeAGoBTYDtyhqgf6af+XwOWq+mcBzmqMM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QXw++pMLnHk+/gz4O8DTz+3DerxCubgHbE2bAPPnMV8G8lR1LvAW516dnebE8fLHTiBXVecBvwBeCtYDi0gK8ALw16pa3/vmPn4kKMdrgFyOHC9VdavqZXiXIFkoIpf2auLI8fIjV9CfjyJyM1Chqjsu1KyP6wJ2vEK5uA9mTRvkAmvaBDuXqlarapvv4v8AC4Y5k7/8OaZBp6r1XW+t1TthLk5Exg3344pIHN4C+mtVfbGPJo4cr4FyOXW8ejx+LfAesKLXTU48HwfM5dDzcRmwUkSK8XbdXisiT/VqM6zHK5SLe/eaNiISj/cDhw292nStaQN+rmkTjFy9+mVX4u03DQUbgC/4RoEsBupU9ZTToURkQldfo4gsxPt3WT3Mjyl4l804qKo/6adZ0I+XP7kcOl7pIjLa930ScD1wqFezoD8f/cnlxPNRVb+tqlmqmoe3Rryjqnf3ajasx8uv5QecoCG6po2fub4uIiuBTl+uNcOdC0BEnsE7kmKciJQC38P7AROq+iu8S0h8CigEmoH7QiTXbcBXRaQTaAFWB+FFehlwD7DX118L8B0gp0cuJ46XP7mcOF4TgcfFuzNbDPCsqr7i9PPRz1yOPB/7EszjZTNUjTEmAoVyt4wxxpghsuJujDERyIq7McZEICvuxhgTgay4G2NMBLLibowxEciKuzHGRCAr7sYYE4H+PwtZrguBJgKrAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(u.numpy(), '--', linewidth=2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 183,
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "'module' object is not callable",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-183-aaa8465200db>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mtorch\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdistributions\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0muniform\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m0.2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m: 'module' object is not callable"
     ]
    }
   ],
   "source": [
    "torch.distributions.uniform(0, 0.2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 187,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'u' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-187-c3ae3ae58f62>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mtorch\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mFloatTensor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mu\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0muniform_\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m0.2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'u' is not defined"
     ]
    }
   ],
   "source": [
    "torch.FloatTensor(u.shape).uniform_(0, 0.2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "base"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
